package com.vector.server.Utils;

import com.vector.server.pojo.Admin;
import org.springframework.security.core.context.SecurityContextHolder;

/**
 * @program: yeb
 * @description: 操作员工具类
 * @author: Acerola
 * @create: 2021-09-07 19:46
 **/
//获取当前登录对象
public class AdminUtils {
    public static Admin getCurrentAdmin() {
        return (Admin) SecurityContextHolder.getContext().getAuthentication()
                .getPrincipal();
    }
}
